// import { Component, OnInit, Input } from '@angular/core';
import { FormControl } from '@angular/forms';
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChange } from '@angular/core';

@Component({
    selector: 'app-validator-message',
    templateUrl: './validator-message.component.html',
    styleUrls: ['./validator-message.component.styl']
})
export class ValidatorMessageComponent implements OnInit {
    @Input() control: FormControl;
    @Input() controlName: string;
    
    constructor() { }

    ngOnInit() {
        console.log('control',this.control,'controlName',this.controlName)
    }

     ngOnChanges(changes: { [propKey: string]: SimpleChange }): void {
            const control = changes['control'];
            const controlName = changes['controlName'];
            // const pageSize = changes['pageSize'];
            if (control || controlName) {
                console.log('control',this.control,'controlName',this.controlName);
            }
        }

}
